﻿using System.Collections;
using System.Collections.Generic;
using Entitas;
using UnityEngine;

namespace Game
{
    public class GameController : MonoBehaviour
    {
        private Systems systems;
        private Contexts contexts;

        private void Start()
        {
            contexts = Contexts.sharedInstance;
            systems = CreatSystem(contexts);
        }

        private Systems CreatSystem(Contexts contexts)
        {
            return new Feature("GameFeature")
                .Add(new GameFeature(contexts));
        }

        void Update()
        {
            systems.Execute();
            systems.Cleanup();
        }

    }
}

